I'm looking for a method of indicating (within a menu) which sizes are available (without scaling) for a given font. Sort of like the size menu in WriteIt!, AWGS, etc.
Jeff
Path: IIGS Toolbox/Font Size Menus
Subj: one way... 91-07-10 03:03:02 EST
From: A2Pro Tim
Posted on: America Online
Call CountFamilies to get the number of different font families in your system, then loop through each family calling CountFonts to find out how many fonts in each family. From there, you should be able to call FindFontStats to step through the sizes (9, 10, 12, 14, 16, 18, etc) that are normally in your menu to see which of those sizes really do exist.
There are probably better ways, but it's late, I'm tired and I never had to think about this before... :-)
'Sides, that's more elegant than stepping through the directory of your */System/Fonts folder and parsing things manually... :-)
Tim S.
Path: IIGS Toolbox/Font Size Menus
Subj: Font Size Menus 91-07-10 19:03:53 EST
From: Damien9
Posted on: America Online
Thanks, Tim.
I figured it out, tho'. All you need to do is each time the font changes, call CountFonts once for each size you have in your menu, and set the menu style to indicate if the font exists or not. It goes pretty quick too...
Jeff
Looking for a method of determining which sizes are real for a given font...